<template>
    <div class="leave-apply">
        <apply-header process-name="请假流程审批" @cancel-click="cancelClick" @submit-click="submit"/>
        <div class="apply-content">
            <el-form ref="formRef" :model="leave" :rules="rules" label-position="left" label-width="130px" label-suffix="：">
                <form-title title="请假申请审批"/>
<!--                <el-row>-->
<!--                    <el-col :span="12">-->
<!--                        <el-form-item prop="startUser" style="display: none">-->
<!--                            <el-input v-model="leave.startUser"/>-->
<!--                        </el-form-item>-->
<!--                        <el-form-item prop="startUserName" label="申请人">-->
<!--                            <el-input v-model="this.leave.startUserName" style="width: 200px" disabled/>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
<!--                    <el-col :span="12">-->
<!--                        <el-form-item prop="holidayType" label="请假类型">-->
<!--                            <el-select-v2 :options="typeData" v-model="leave.holidayType" filterable placeholder="选择请假类型">-->
<!--                                <template #default="{item}">-->
<!--                                    &lt;!&ndash;                                    {{item.value}}&ndash;&gt;-->
<!--                                    <div style="width: 100%" @click="showTypeName(item)">{{item.label}}</div>-->
<!--                                </template>-->
<!--                            </el-select-v2>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
<!--                </el-row>-->
<!--                <el-row>-->
<!--                    <el-col :span="12">-->
<!--                        <el-form-item label="请假开始日期" prop="beginDate2">-->
<!--                            <el-date-picker type="date" placeholder="请假开始日期" v-model="leave.beginDate2" value-format="YYYY-MM-DD" @change="convertDate"/>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
<!--                    <el-col :span="12" class="time-select">-->
<!--                        <el-form-item label="请假开始时间" prop="beginTime2">-->
<!--                            <el-time-select v-model="leave.beginTime2" start="08:00" step="00:15" end="24:00" placeholder="请假开始时间" @change="convertDate"/>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
<!--                </el-row>-->
<!--                <el-row>-->
<!--                    <el-col :span="12">-->
<!--                        <el-form-item label="请假结束日期" prop="endDate2">-->
<!--                            <el-date-picker type="date" placeholder="请假结束日期" v-model="leave.endDate2" value-format="YYYY-MM-DD" @change="convertDate"/>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
<!--                    <el-col :span="12" class="time-select">-->
<!--                        <el-form-item label="请假结束时间" prop="endTime2">-->
<!--                            <el-time-select v-model="leave.endTime2" start="08:00" step="00:15" end="24:00" placeholder="请假结束时间" @change="convertDate"/>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
<!--                </el-row>-->
<!--                <el-row>-->
<!--                    <el-col :span="12">-->
<!--                        <el-form-item label="请假天数" prop="days">-->
<!--                            <el-input v-model="leave.days" style="width: 120px;" disabled>-->
<!--                                <template #append>天</template>-->
<!--                            </el-input>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
<!--                </el-row>-->
<!--                <el-row>-->
<!--                    <el-col :span="24">-->
<!--                        <el-form-item label="请假原因" prop="cause">-->
<!--                            <el-input type="textarea" placeholder="请输入请假原因" v-model="leave.cause"/>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
<!--                </el-row>-->
<!--                <el-row>-->
<!--                    <el-col :span="8">-->
<!--                        <el-form-item label="审批领导" prop="leaderAssignee">-->
<!--                            <el-select-v2 :options="leaderData" v-model="leave.leaderAssignee" placeholder="请选择审批领导" disabled/>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
<!--                    <el-col :span="8">-->
<!--                        <el-form-item label="人事审批" prop="perAssignee">-->
<!--                            <el-select-v2 :options="hrSpecialist" v-model="leave.perAssignee" placeholder="请选择人事审批人员"/>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
<!--                </el-row>-->
            </el-form>
        </div>
    </div>
</template>

<script>
import ApplyHeader from "../../../com/apply/ApplyHeader.vue";
import FormTitle from "../../../com/apply/FormTitle.vue";

export default {
    name: "LeaveApply",
    components: {FormTitle, ApplyHeader},
    data(){
        return {
            leave: null
        }
    },
    methods:{
        cancelClick(){
            let returnUrl = this.$route.query.returnUrl;
            this.$router.push(returnUrl)
        },
        loadTaskDetail(){
            let taskId = this.$route.query.taskId;
            console.log('taskId',taskId)
        }
    },
    created() {
        this.loadTaskDetail();
    },
}
</script>

<style scoped>
*{
    /*border: 1px solid red;*/
}
.leave-apply{

}
.apply-content{
    margin: 0 auto;
    width: 1240px;
    box-shadow: 0 0 2px 1px lightgrey;
    background: rgb(252,252,252);
    padding: 0 20px;
    box-sizing: border-box;
}
</style>